home *** CD-ROM | disk | FTP | other *** search
- Path: lyra.csx.cam.ac.uk!nmm1
- From: nmm1@cus.cam.ac.uk (Nick Maclaren)
- Newsgroups: comp.std.c
- Subject: Re: Meaning of __STDC__?
- Date: 14 Jan 1996 12:27:09 GMT
- Organization: University of Cambridge, England
- Message-ID: <4dasqt$k7c@lyra.csx.cam.ac.uk>
- References: <4d6673$8to@mailgate.bridgewater.ne.hcc.com> <DL545u.MBy%spenford@zoo.toronto.edu>
- NNTP-Posting-Host: bootes.cus.cam.ac.uk
-
- In article <DL545u.MBy%spenford@zoo.toronto.edu>,
- Henry Spencer <henry@zoo.toronto.edu> wrote:
- >
- >Actually, the standard says that __STDC__ is 1 in ANSI C. It (necessarily)
- >says nothing about what __STDC__ might or might not be in non-standard C.
- >So technically you can't draw any conclusions at all from the presence of
- >__STDC__; the valid conclusion is `standard -> __STDC__', not vice-versa.
- >Of course, one would hope that most implementors have the sense to define
- >__STDC__ only when the standard is satisfied, but counterexamples do exist.
-
- Yes, indeed, and it is usually worth watching out for __STDC__ being
- set to 0. This commonly means "this compiler accepts a language that
- looks very like standard C, but has subtle and confusing differences."
-
- I have never seen __STDC__ in any other states than unset, set to 0
- and set to 1, but wouldn't rule it out.
-
-
- Nick Maclaren,
- University of Cambridge Computer Laboratory,
- New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
- Email: nmm1@cam.ac.uk
- Tel.: +44 1223 334761 Fax: +44 1223 334679
-